<%@ taglib prefix="s" uri="/struts-tags" %>
<link type="text/css" href="<%=request.getContextPath()%>/css/common/jquery/jquery-ui-1.8.14.custom_ui_widget.css" rel="Stylesheet" />	
<script type="text/javascript" src="<%=request.getContextPath()%>/js/common/jquery/core/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/common/jquery/ui/jquery-ui-1.8.14.custom.min_ui_widget.js"></script>

<script type="text/javascript">
		$(document).ready(function() {
		    $(function() {
			$( "#tabs" ).tabs();
		    });
		    // Mouseover effect for buttons acting link links
		    $(".hyperlinkButton").mouseover(function() {
			$(this).css('cursor','pointer');
		    	$(this).removeClass().addClass("hyperlinkButtonMouseOver");
		    }).mouseout(function() {
			$(this).css('cursor','pointer');
		    	$(this).removeClass().addClass("hyperlinkButton");		
		    });
		});

		// Other than the selected tab, every other tab will be hidden
		function showHideTabs(selectedTabId) {
			if (selectedTabId == 1) {
				$( "#tabs" ).tabs( "option", "disabled", [2, 3, 4, 5, 6, 7] );
			}
			else if (selectedTabId == 2) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 3, 4, 5, 6, 7] );
			}
			else if (selectedTabId == 3) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 2, 4, 5, 6, 7] );
			}
			else if (selectedTabId == 4) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 3, 2, 5, 6, 7] );
			}
			else if (selectedTabId == 5) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 3, 4, 2, 6, 7] );
			}
			else if (selectedTabId == 6) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 3, 4, 5, 2, 7] );
			}
			else if (selectedTabId == 7) {
				$( "#tabs" ).tabs( "option", "disabled", [1, 3, 4, 5, 6, 2] );
			}
		}
		
		$(document).ready(function() {
			$( "#tabs" ).tabs({
				ajaxOptions: {
					error: function( xhr, status, index, anchor ) {
						$( anchor.hash ).html(
							"Couldn't load this tab. We'll try to fix this as soon as possible. " +
							"If this wouldn't be a demo." );
					}
				}
			});
		});		

		// Ajax submit functions
		$(document).ready(function() {
			// set the tabs
	        $("#tabs").tabs();
		    // Capture the form's submit event
	        $('.inlineForm').live('submit', function() {
		    	var $tabs = $('#tabs').tabs();
		    	var selected = $tabs.tabs('option', 'selected');
			showHideTabs(selected);
		    	$('#hiddenTabId').val(selected);
		    	$.ajax({ // create an AJAX call...
		       		traditional: true,
					data: $(this).serialize(), // get the form data
					type: $(this).attr('method'), // GET or POST
					url: $(this).attr('action'), // the file to call
					success: function(response) { // on success..
						$('.ui-tabs-panel:visible').html(response); // update the DIV			
					}
		    	});
	       	    return false; // cancel original event to prevent form submitting
		    });
		});
</script>

<div id="main">		
	<h1>Mock Exams and Stuff</h1>
	<p>Please click on the tabs below to learn more!</p>
	<div id="mockExamTabs" style="margin: 5px 10px;">
			<div id="tabs">
				<ul>
				  <li><a href="#tabs-1">Read Me</a></li>
				  <li><a href="<s:url action='loadCoreJavaExams' namespace="/content"/>">Core Java</a></li>
				  <li><a href="<s:url action='loadJSPExams' namespace="/content"/>">JSP and Servlets</a></li>
				  <li><a href="<s:url action='loadJSFExams' namespace="/content"/>">JSF</a></li>
				  <li><a href="#tabs-5">EJB</a></li>
				  <li><a href="#tabs-6">JPA</a></li>
				  <li><a href="#tabs-7">Spring</a></li>
				  <li><a href="#tabs-8">Spring</a></li>
				  <li><a href="#tabs-9">Other Frameworks</a></li>
				</ul>
			    <div id="tabs-1">
				  <p style="color:black">
				  	Please read below before you proceed to attempt any of the exams.<br>
				  	
				  	General Instructions: <br>
				  	
				  	Each exam mentions the number of questions that it has<br>
				  	There is no time limit to finish an exam<br>
				  	<br>
				  	There is not time limit to finish an exam<br>
				  	There is not time limit to finish an exam<br>
				  	There is not time limit to finish an exam<br>
				  	
				  	Golden Rule: <br>
				  	
				  	Do not click the browser back button whe you are in the middle of an exam.<br>
				  	
				  	Please click on the tabs of your interest to find all the currently available mock exams.
				  	
					This page has a lot to offer. But it is in the very beggining of its inception... Just browse through the tabs and you will find
					ample resources to articles and certifications.
					This page has a lot to offer. But it is in the very beggining of its inception... Just browse through the tabs and you will find
					ample resources to articles and certifications.
					This page has a lot to offer. But it is in the very beggining of its inception... Just browse through the tabs and you will find
					ample resources to articles and certifications.
					This page has a lot to offer. But it is in the very beggining of its inception... Just browse through the tabs and you will find
					ample resources to articles and certifications.
					
					
					This page has a lot to offer. But it is in the very beggining of its inception... Just browse through the tabs and you will find
				  </p>
				  <p style="color:red">Hasta Siempre</p>
			    </div>
			</div>
	    </div>
</div>